<!--{include(file='head.html')}-->

<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div id="main_c" >
			<form name="seaform" id="seaform" action="<!--{url('admin','coupon','index')}-->" method="post">
				<div class="bt_bk">
					<span class="btn">
						<a href="javascript:void(0);" onclick="$.oper.refresh();return false;">刷新</a>
						<a href="javascript:void(0);" onclick="$.oper.cdelete();return false;">删除</a>
						<a href="<!--{url('admin','coupon','couponadd')}-->">添加</a>
					</span>
					<span class="state_tip"></span>
				</div>
				<input type="hidden" value="<!--{def($pagearr['page'],1)}-->"		name="page" id="page"/>
				<input type="hidden" value="<!--{def($pagearr['pagesize'],10)}-->"	name="pagesize" id="pagesize" />
			</form>
			<!--{include_page("page.html","top")}-->
			<table class="tableStyle" border="0" cellspacing="0" cellpadding="0">
				<thead>
					<tr align="center">
						<th width="5%">
							<input type="checkbox" value="1" name="allselect" id="allselect" autocomplete="off" onclick="$.oper.selectall()"/>
						</th>
						<th width="10%">操作</th>
						<th width="10%">主题</th>
						<th width="10%">是否发布</th>
						<th width="10%">优惠券面额</th>
						<th width="15%">数量/已领用</th>
						<th width="10%">每人限领</th>
						<th width="10%">有效期</th>
						<th width="20%">使用条件</th>
						<th width="10%">领取地址</th>
					</tr>
				</thead>
				<tbody id="listtbody">
					<!--{foreach $coupons coupon}-->
					<tr align="center"  id="tr_<!--{$coupon.couponid}-->">
						<td><input type="checkbox" value="<!--{$coupon.couponid}-->" name="singleselect" autocomplete="off"/></td>
						<td>
							<a href="<!--{url('admin','coupon','couponedit','couponid=$coupon.couponid')}-->" class="edit"></a>
							<a href="javascript:void(0);" onclick="$.oper.cdelete('<!--{$coupon.couponid}-->');return false;" class="del"></a>
						</td>
						<td><!--{$coupon.subject}--></td>
						<td>
<a href="<!--{url('admin','coupon','couponsave','opertype=editfield&field=publish&couponid=$coupon.couponid')}-->" 
<!--{if $coupon.ispublish}-->class="publish" title="取消发布"<!--{else}-->class="unpublish" title="设置发布"<!--{/if}-->></a>
						</td>
						<td><!--{$coupon.deno}--></td>
						<td><!--{$coupon.total}-->/<!--{$coupon.num}--></td>
						<td><!--{$coupon.restrict}--></td>
						<td>
							<!--{date('m-d',$coupon.endtime)}-->
						</td>
						<td>
							订单满<!--{$coupon.require}-->元
						</td>
						<td>
							<a href="###" onclick="$.oper.copy('<!--{$weburl}--><!--{url('index','coupon','draw','couponid=$coupon.couponid')}-->');return false;">复制</a>
						</td>
					</tr>
					<!--{/foreach}-->
				</tbody>
			</table>
			<!--{include_page("page.html","foot")}-->
		</div>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	$.oper.init("<!--{url('admin','coupon','couponsave')}-->");
});
</script>